import request from '/@/utils/request';

/**
 * 获取统计数据
 */
export const statisticsAPI = () => {
	return request({
		url: '/admin/dashboard/statistics',
		method: 'get',
	});
};

/**
 * 获取排行榜
 */
export const getRankingListAPI = (params: any) => {
	return request({
		url: '/admin/dashboard/ranking-list',
		method: 'get',
		params,
	});
};

/**
 * 获取最新订单
 */
export const getLatestOrderAPI = (params: any) => {
	return request({
		url: '/admin/dashboard/latest-orders',
		method: 'get',
		params,
	});
};
/**
 * 获取图表数据
 */
export const getChartDataAPI = (params: any) => {
	return request({
		url: '/admin/dashboard/chart',
		method: 'get',
		params,
	});
};
/**
 * 获取订单状态
 */
export const getStateOrdersAPI = () => {
	return request({
		url: '/admin/dashboard/state-orders',
		method: 'get',
	});
};
